package lapsnake.model.expr;

import lapsnake.model.*;
import lapsnake.model.data.*;
import lapsnake.model.data.SingleChild;
import lapsnake.model.misc.LapArguments;
import lapsnake.py.ast.ASTHelperFactory; import java.beans.PropertyVetoException;

import org.python.antlr.ast.*;

/**Wrapper class with helper functions for Lambda nodes*/
public class LapLambda extends LapExpression {
	
	public final SingleChild<LapArguments> args = new SingleChild<>(this, LapArguments.class);
	public final SingleChild<LapExpression> body = new SingleChild<>(this, LapExpression.class);
	
	public LapLambda(PyAST pyAST, ChildField<? super LapLambda> parent, Lambda node) throws PropertyVetoException {
		super(pyAST, parent, node);
		
		ASTHelperFactory.makeHelper(pyAST, args, node.getInternalArgs());
		ASTHelperFactory.makeHelper(pyAST, body, node.getInternalBody());
		
		buildTextNodes(node);
	}
}
